import { ls } from '@/utils/store'

const LOCAL_NAME = 'language'

export function defaultSetting() {
    return {
        isMobile: false,
        language: getLocalSetting(),
        isCollapse: false
    }
}

export function getLocalSetting() {
    return ls.get(LOCAL_NAME) || 'en-US'
}

export function setLocalSetting(setting) {
    ls.set(LOCAL_NAME, setting)
}